﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="SelectControl.ascx.cs" Inherits="WebForm_CSharpCode_SelectControl" %>
    <asp:Panel ID="panel1" runat="server" BackColor="white" BorderWidth="1" Style="cursor: move;" Width="300">
    <div>    
        <div align="center"><asp:Label ID="lblTitle" runat="server" SkinID="title"></asp:Label></div>
        <table width="100%">
            <tr>
                <td align="center">
                    <table>
                        <tr>
                            <td align="right">
                    <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>
                            </td>
                            <td valign="bottom">
                    <asp:Button ID="btnAdd" runat="server" Text="+" UseSubmitBehavior="False" 
                                    onclick="btnAdd_Click" />
                    <asp:Button ID="btnQuery" runat="server" Text="查詢" onclick="btnQuery_Click" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
        <My:MyGridView ID="GridView1" SkinID="pager" AllowHoverSelect="False" 
            runat="server" AllowPaging="True"  EmptyDataText="<%$ Resources:EmptyDataText %>"
            AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="GUID"
            MySortDirection="Ascending" 
            onpageindexchanging="GridView1_PageIndexChanging" 
            onrowcreated="GridView1_RowCreated" 
            onselectedindexchanged="GridView1_SelectedIndexChanged" 
            onsorting="GridView1_Sorting" AllowHoverEffect="True"  
            Width="100%" >    
            <Columns>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:CheckBox ID="CheckBox1" runat="server" />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" Width="0px"/>
                </asp:TemplateField>
            </Columns>
        </My:MyGridView >
    </div>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        OldValuesParameterFormatString="original_{0}" 
        TypeName="BLL_SelectControl" 
    onselected="ObjectDataSource1_Selected" 
        >
    </asp:ObjectDataSource>
    
    <asp:DropDownList ID="ddlA" runat="server" Visible="False">
    </asp:DropDownList>
    <asp:DropDownList ID="ddlB" runat="server" Visible="False">
        <asp:ListItem Value="Like">包含</asp:ListItem>
        <asp:ListItem Value="=">等於</asp:ListItem>
        <asp:ListItem Value="&gt;=">大於等於</asp:ListItem>
        <asp:ListItem Value="&lt;=">小於等於</asp:ListItem>
    </asp:DropDownList>   
    <div align="center">
    <asp:Button ID="btnOK" runat="server"  Text="<%$ Resources:OK%>" 
            onclick="btnOK_Click" UseSubmitBehavior="False" />
    <asp:Button ID="btnCancel" runat="server" Text="<%$ Resources:Cancel%>" 
            onclick="btnCancel_Click" UseSubmitBehavior="False" />
    </div>
    </asp:Panel>
    <asp:Button ID="btnDummy" runat="server" Style="display: none" SkinID="null" />
    <ajaxToolkit:ModalPopupExtender ID="mpSearch" runat="server" TargetControlID="btnDummy"
    PopupControlID="panel1" CancelControlID="btnCancel" 
    PopupDragHandleControlID="panel1" />